package com.hoperun.utils;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.hoperun.bean.AdminDictionaryType;
import com.hoperun.framework.query.Criteria;
import com.hoperun.service.IAdminDictionaryTypeSV;

/**
 * .
 * <p/>
 * 
 * @author <a href="mailto:1988fuyu@163.com">fuyu</a>
 * @version V1.0, 2012-12-13
 */
@Component
public class CodeMasterHelper {

	private static IAdminDictionaryTypeSV dictionaryTypeSV;

	@Autowired
	public void init(IAdminDictionaryTypeSV dictionaryTypeSV) {
		CodeMasterHelper.dictionaryTypeSV = dictionaryTypeSV;
	}

	public static List<AdminDictionaryType> getCodeMaster(Criteria criteria) {
		try {
			return dictionaryTypeSV.queryBySpecificCondition(criteria);
		} catch (Exception e) {
			e.printStackTrace();
		}

		return null;
	}

}
